#include <iostream>

using std::cout;
using std::endl;

class A
{
public:
    A(int ix = 0)
    : _ix(ix)
    {

    }

    void print()
    {
        cout << "hello" << endl;
    }

    void show()
    {
        cout << "_ix = " << this->_ix << endl;
    }

private:
    int _ix;
};

int main(int argc, char **argv)
{
    A a(10);
    a.print();
    a.show();

    cout << endl;
    A *pa = &a;
    pa->print();
    pa->show();//ok

    cout << endl;
    A *pb = nullptr;
    pb->print();
    pb->show();//error

    cout << endl;
    A *pc;
    pc->print();
    pc->show();//???隐患
    return 0;
}

